package com.googlecode.animator.data.materials
{
	import com.googlecode.animator.data.IValueObject;
	
	public class BitmapFileMaterialVO extends MaterialVO
	{
		public static const TYPE:String = "BitmapFileMaterial";
		
		public var filePath:String;
	
		override public function clone(src:* = null):IValueObject
		{
			var clone:IValueObject = super.clone(new BitmapFileMaterialVO());
			
			(clone as BitmapFileMaterialVO).filePath = this.filePath;
			
			return (clone as BitmapFileMaterialVO);
		}
		
		override public function toXML(src:XML = null):XML
		{
			var xml:XML = super.toXML(new XML(<{TYPE} face={this.face}></{TYPE}>));
			
			xml.appendChild(<filePath>{this.filePath}</filePath>);
			
			return xml;
		}
		
		override public function fromXML(src:XML):void
		{
			super.fromXML(src);
			
			this.filePath = src.filePath;
		}
	}
}